cd overheads
cd openclcall
gcc ocl.c -lOpenCL -I/usr/local/cuda-5.5/include
cd ..
cd passingarray
javac *.java
gcc -c -fPIC array.c -I /usr/lib/jvm/java-7-openjdk-amd64/include
gcc array.o -shared -o libarray.so -lOpenCL -Wl,-soname,array
cd ..
cd threads
gcc threads.c -lOpenCL -I/usr/local/cuda-5.5/include
cd ..
cd ..
cd section2
cd crypt
gcc -c -fPIC crypt.c -I /usr/lib/jvm/java-7-openjdk-amd64/include -I/usr/local/cuda-5.5/include
gcc crypt.o -shared -o libcrypt.so -lOpenCL
cd ..
cd sparsematmult
gcc -c -fPIC sparse.c -I /usr/lib/jvm/java-7-openjdk-amd64/include -I/usr/local/cuda-5.5/include
gcc sparse.o -shared -o libsparse.so -lOpenCL
cd ..
cd series
gcc -c -fPIC series.c -I /usr/lib/jvm/java-7-openjdk-amd64/include -I/usr/local/cuda-5.5/include
gcc series.o -shared -o libseries.so -lOpenCL
cd ..
cd ..
export CLASSPATH=$CLASSPATH:$PWD:$PWD/section2
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/section2/crypt:$PWD/section2/series:$PWD/section2/sparsematmult
sudo nvidia-smi -pm 1

javac section2/crypt/*.java
javac section2/sparsematmult/*.java
javac section2/series/*.java
javac section2/*.java

